package org.marketlive.entity;

/*
(C) Copyright MarketLive. 2006. All rights reserved.
MarketLive is a trademark of MarketLive, Inc.
Warning: This computer program is protected by copyright law and international treaties.
Unauthorized reproduction or distribution of this program, or any portion of it, may result
in severe civil and criminal penalties, and will be prosecuted to the maximum extent
possible under the law.
*/

/**
 * Provides the ability to add attributes to <code>IEntity</code> objects.
 * An <code>IAttributePage</code> may contain one or more attributes for a given entity.
 * For example, {@link org.marketlive.entity.family.IFamilyImagePage} contains attributes
 * representing the thumbnail and detail images for a product family.
 * <p/>
 * Attribute pages may contain properties that are Java primitive, primitive-wrapper,
 * <code>String</code>, or <code>Date</code> types. To contain collections of attributes,
 * use {@link IComplexAttributePage}.
 *
 * @see org.marketlive.entity.IEntity
 * @see org.marketlive.entity.IEntityHome
 */
public interface IAttributePage {
    /**
     * Returns the name of this <code>IAttributePage</code>.
     *
     * @return the name of this page
     */
    String getName();
    
    /**
     * Defines if this page contains values that need to be persisted. 
     * 
     * @return true if this page contains values that need to be persisted, false otherwise.
     */
    boolean isEmpty();

    /**
     * Creates and returns a copy of this attribute page object.
     *
     * @return a copy of this <code>IAttributePage</code>
     * @throws   CloneNotSupportedException
     */
    IAttributePage clone() throws CloneNotSupportedException;

}
